#include "TcpServer.hpp"

#include <memory>

void Usage(string s)
{
    cout << "\n\t" << s << "[" << "port " << "ip]" << endl;
}
int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }

    uint16_t port = stoi(argv[1]);
    //string ip = argv[2];
    unique_ptr<TcpServer> tcpSvr(new TcpServer(port));

    tcpSvr->InitServer();
    tcpSvr->RunServer();
    return 0;
}